<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">

<section class="content-header">
    <h1>
        日志列表
    </h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" onsubmit="return false;">
                        <div class="row">
                            <div class="form-inline">
                                <div class="form-group" style="margin-right: 10px;">
                                    <label>用户名</label>
                                    <input type="text" name="account" class="form-control" placeholder="请输入用户名">
                                </div>
                                <div class="form-group" style="margin-right: 10px;">
                                    <label>内容</label>
                                    <input type="text" name="operationName" class="form-control" placeholder="请输入查询内容">
                                </div>
                                <div class="form-group" style="margin-right: 10px;">
                                    <label>时间</label>
                                    <input type="text" class="form-control datepicker" name="startTime" readonly="readonly" />
                                    <span>至</span>
                                    <input type="text" class="form-control datepicker" name="endTime" readonly="readonly" />
                                </div>
                                <button type="button" class="btn btn-success" id="btn-search">
                                    <!--<i class="fa fa-search"></i>-->
                                    <span class="Bold">搜索</span>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">

    var table;

    $(function () {
        /** 加载用户表格 */
        table = js.table.init({
            url: ctx + "sys/log/list",
            columns: [
                {
                    title: '序号', field: 'id', width: '40',
                    formatter: function (value, row, index, field) {
                        return index + 1;
                    }
                },
                { title: "帐号", field: 'account'},
                { title: "用户名", field: 'name'},
                { title: "操作名称", field: 'operationName'},
                { title: "操作内容", field: 'operationContent'},
                { title: "操作时间", field: 'operationTime'},
                { title: "IP地址", field: 'address'}
            ]
        });

        /**
         * 表格搜索
         */
        $("#btn-search").click(function () {
            js.table.search(table);
        });
    });

</script>
</body>
</html>
